< previous page page_104 next page >

Page 104
EXERCISE
Add a Shortcut Key
1. Open the Menu Design window.
2. Click() the File, Exit menu item.
3. Click() the Shortcut combo box to view the list of available keystrokes.
4. Press the Ctrl+X key combination.
5. Click() the OK button to accept this change.
6. Run the project again and press Ctrl+X to invoke the mnuFExit_Click() event.
analysis.gifA shortcut key is a great keyboard shortcut for an experienced user.

Summary
In this chapter, you learned how to write code to respond to many different event procedures for some of the basic controls. When a control is double-clicked, a code window appears, allowing you to type in code to respond to an event. There are many different events for each control. However, most of the events are the same for the different controls. This is probably the hardest part of learning the Visual Basic languagethat is, learning what each event does.
Review Questions
1. Whats the default event for a command button?
2. Whats the default event for a text box?
3. Whats the default event for an option button?
4. How do you bring up a code window for a particular control?

 
< previous page page_104 next page >

If you like this book, buy it!